function update() {
    $.ajax({
            url: '/Update',
            type: "POST",
            data: {
                username:$("#userName").val(),
                sex: $("#sex").val(),
                describle: $("#auto").val(),
                profession: $("#profession").val()
            }
            ,
            success: function (data) {
                switch (data['code']) {
                    case 0:
                        window.location.reload();
                        break;
                    case 1:
                        alert("用户不存在！");
                        break;
                    case 2:
                        alert("失败！");
                        break;
                }
            }
            ,
            error: function (err) {
                console.log(err);
            }
        }
    );
}
